{extend name="public/base" /}
{block name='content'}
{include file='public/content_header' /}
<!--数据列表页面-->
<section class="content">

    <!--顶部搜索筛选-->
    <div class="row">
        <div class="col-md-12">
            <div class="box">
                <div class="box-body">
                    <form class="form-inline searchForm" id="searchForm" action="{:url('index')}" method="GET">

                        <div class="form-group" style="padding-top: 3px;">
                            <input value="{$member_id ? $member_id : '' ;}"
                                   name="member_id" id="member_id" class="form-control input-sm"
                                   placeholder="用户融云ID搜索">
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <input value="{$me_uid ? $me_uid : '' ;}"
                                   name="me_uid" id="me_uid" class="form-control input-sm"
                                   placeholder="用户UID搜索">
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <input value="{$me_phone ? $me_phone : '' ;}"
                                   name="me_phone" id="me_phone" class="form-control input-sm"
                                   placeholder="用户手机号/昵称搜索">
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <select name="me_sex" id="me_sex" class="form-control input-sm index-search">
                                <option value="">-用户性别-</option>
                                <option value="1"{if isset($me_sex) && $me_sex=='1'}selected{/if}>男</option>
                                <option value="2"{if isset($me_sex) && $me_sex=='2'}selected{/if}>女</option>
                            </select>
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <input value="{$order_number ? $order_number : '' ;}"
                                   name="order_number" id="order_number" class="form-control input-sm"
                                   placeholder="提现订单号搜索">
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <select name="status" id="status" class="form-control input-sm index-search">
                                <option value="">-审核状态-</option>
                                <option value="0"{if isset($status) && $status=='0'}selected{/if}>待审核</option>
                                <option value="1"{if isset($status) && $status=='1'}selected{/if}>通过提现</option>
                                <option value="2"{if isset($status) && $status=='2'}selected{/if}>拒绝提现</option>
                            </select>
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <select name="sk_type" id="sk_type" class="form-control input-sm index-search">
                                <option value="">-收款类型-</option>
                                <option value="1"{if isset($sk_type) && $sk_type=='1'}selected{/if}>微信</option>
                                <option value="2"{if isset($sk_type) && $sk_type=='2'}selected{/if}>支付宝</option>
                            </select>
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <select name="is_pending" id="is_pending" class="form-control input-sm index-search">
                                <option value="">-待定标签-</option>
                                <option value="1"{if isset($is_pending) && $is_pending=='1'}selected{/if}>已设置</option>
                                <option value="0"{if isset($is_pending) && $is_pending=='0'}selected{/if}>未设置</option>
                            </select>
                        </div>
<!--                        <div class="form-group" style="padding-top: 3px;">-->
<!--                            <select name="is_pass_withdrawal" id="is_pass_withdrawal" class="form-control input-sm index-search">-->
<!--                                <option value="">-免审核-</option>-->
<!--                                <option value="1"{if isset($is_pass_withdrawal) && $is_pass_withdrawal=='1'}selected{/if}>已开启</option>-->
<!--                                <option value="0"{if isset($is_pass_withdrawal) && $is_pass_withdrawal=='0'}selected{/if}>未开启</option>-->
<!--                            </select>-->
<!--                        </div>-->
                        <div class="form-group" style="padding-top: 3px;">
                            <input value="{$add_time|default=''}" readonly name="add_time" id="add_time"
                                   class="form-control input-sm indexSearchDateRange" placeholder="提现时间搜索">
                        </div>
                        <script>
                            laydate.render({
                                elem: '#add_time',
                                range: true,
                            });
                        </script>
                        <div class="form-group" style="padding-top: 3px;">
                            <input value="{$f_member_id ? $f_member_id : '' ;}"
                                   name="f_member_id" id="f_member_id" class="form-control input-sm"
                                   placeholder="上级用户融云ID搜索">
                        </div>

                        <div class="form-group" style="padding-top: 3px;">
                            <button class="btn btn-sm btn-primary" type="submit"><i class="fa fa-search"></i> 查询
                            </button>
                        </div>

<!--                        <div class="form-group">-->
<!--                            <button onclick="exportData('index.html')" class="btn btn-sm btn-warning exportData" type="button"> 导出信息-->
<!--                            </button>-->
<!--                        </div>-->

                        <div class="form-group" style="padding-top: 3px;">
                            <button onclick="clearSearchForm()" class="btn btn-sm btn-default" type="button"><i
                                    class="fa  fa-eraser"></i> 清空查询
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-12">
            <div class="box">

                <!--数据列表顶部-->
                <div class="box-header">
                    <div>
                        <a class="btn btn-success btn-sm ReloadButton" data-toggle="tooltip" title="刷新">
                            <i class="fa fa-refresh"></i> 刷新
                        </a>
                        <b>【总提现待审核（不包含手续费）：{$dsh_money} 元】【云账户预存金额：{$yzhyc_money} 元】  【总提现通过（不包含手续费）：{$tg_money} 元】  【总提现拒绝（不包含手续费）：{$jj_money} 元】</b>
                    </div>
                </div>

                <div class="box-body table-responsive">
                    <table class="table table-hover table-bordered datatable" width="100%">
                        <thead>
                        <tr style="white-space: nowrap">
                            <th style="text-align: center;vertical-align: middle;width: 15%">提现用户信息</th>
<!--                            <th style="text-align: center;vertical-align: middle;width: 5%">免审核</th>-->
                            <th style="text-align: center;vertical-align: middle;width: 15%">手机号 / 性别</th>
                            <th style="text-align: center;vertical-align: middle;width: 5%">可提 / 不可提</th>
                            <th style="text-align: center;vertical-align: middle;width: 5%">真实姓名</th>
                            <th style="text-align: center;vertical-align: middle;width: 5%">提现订单号</th>
                            <th style="text-align: center;vertical-align: middle;width: 15%">上級用户信息</th>
<!--                            <th style="text-align: center;vertical-align: middle;width: 15%">上上级用户信息</th>-->
                            <th style="text-align: center;vertical-align: middle;width: 5%">提现油票数 / 手续费</th>
                            <th style="text-align: center;vertical-align: middle;width: 5%">实际到账</th>
                            <th style="text-align: center;vertical-align: middle;width: 5%">当时剩余</th>
                            <th style="text-align: center;vertical-align: middle;width: 5%">收款类型</th>
                            <th style="text-align: center;vertical-align: middle;width: 10%">收款信息</th>
                            <th style="text-align: center;vertical-align: middle;width: 10%">提现时间</th>
                            <th style="text-align: center;vertical-align: middle;width: 10%">最后发作品</th>
                            <th style="text-align: center;vertical-align: middle;width: 5%">审核状态</th>
                            <th style="text-align: center;vertical-align: middle;width: 10%">处理时间</th>
                            <th style="text-align: center;vertical-align: middle;width: 10%">审核备注</th>
                            <th style="text-align: center;vertical-align: middle;width: 10%">待定标签</th>
                            <th style="text-align: center;vertical-align: middle;width: 10%">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {foreach name='data' id='item' key='data_key'}

                        {if $item.tr_color==0}
                        <tr>
                        {/if}
                        {if $item.tr_color==1}
                        <tr style="background-color: burlywood">
                        {/if}
                        {if $item.tr_color==2}
                        <tr style="background-color: aqua">
                        {/if}
                        {if $item.tr_color==3}
                        <tr style="background-color: aquamarine">
                        {/if}

                            <td style="text-align: center;vertical-align: middle;">【融云ID：{$item.member_id}】【昵称：{$item.me_nick_name}】{$item.me_status_word}</td>

<!--                            {if $item.is_pass_withdrawal==0}-->
<!--                            <td style="text-align: center;vertical-align: middle;">{$item.is_pass_withdrawal_word}-->
<!--                                <a class="btn btn-success btn-xs AjaxButton" data-toggle="tooltip" title="为此用户开通【提现免审核】功能"-->
<!--                                   data-id="{$item.member_id}" data-confirm-title="为此用户开通【提现免审核】功能确认"-->
<!--                                   data-confirm-content='您确定要为融云ID为<span class="text-red">{$item.member_id}</span> 的用户开通【提现免审核】功能吗？？'-->
<!--                                   data-url="{:url('setpassmsh?index=1')}">-->
<!--                                    <i class="fa fa-circle"></i>-->
<!--                                </a>-->
<!--                            </td>-->
<!--                            {else/}-->
<!--                            <td style="text-align: center;vertical-align: middle;"><span style="color: green">{$item.is_pass_withdrawal_word}</span>-->
<!--                                <a class="btn btn-warning btn-xs AjaxButton" data-toggle="tooltip" title="关闭此用户【提现免审核】功能"-->
<!--                                   data-id="{$item.member_id}" data-confirm-title="关闭此用户【提现免审核】功能确认"-->
<!--                                   data-confirm-content='您确定关闭融云ID为<span class="text-red">{$item.member_id}</span> 的用户【提现免审核】功能吗？？'-->
<!--                                   data-url="{:url('setpassmsh?index=0')}">-->
<!--                                    <i class="fa fa-circle"></i>-->
<!--                                </a>-->
<!--                            </td>-->
<!--                            {/if}-->

                            <td style="text-align: center;vertical-align: middle;">【手机号：{$item.me_phone}】【性别：{$item.me_sex_word}】</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.stamp_money} / {$item.no_stamp_money}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.me_realname}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.order_number}</td>

                            {if $item.f_member_id==0}
                            <td style="text-align: center;vertical-align: middle;">无上级</td>
                            {else/}
                            <td style="text-align: center;vertical-align: middle;">【融云ID：{$item.f_member_id}】【昵称：{$item.f_me_nick_name}】</td>
                            {/if}


                            <td style="text-align: center;vertical-align: middle;">{$item.total_withdrawal} / {$item.fee_withdrawal}（{$item.fee_bl}%）</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.actual_withdrawal} 元</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.after_money_word}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.sk_type_word}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.sk_type_info}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.add_time}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.video_add_time}</td>
                            <td style="text-align: center;vertical-align: middle;">
                                {if $item.status==0}
                                <span style="color: blue">{$item.status_word}</span>
                                {/if}
                                {if $item.status==1}
                                <span style="color: green">{$item.status_word}</span>
                                {/if}
                                {if $item.status==2}
                                <span style="color: red">{$item.status_word}</span>
                                {/if}
                            </td>
                            <td style="text-align: center;vertical-align: middle;">{$item.operation_time}</td>
                            <td style="text-align: center;vertical-align: middle;" title="{$item.content}">{$item.content_sl}</td>

                            {if $item.status==0}
                            <td style="text-align: center;vertical-align: middle;">{$item.is_pending_word}
                                {if $item.is_pending==0}
                                <a class="btn btn-success btn-xs AjaxButton" data-toggle="tooltip" title="为此条提现记录设置【待定标签】"
                                   data-id="{$item.id}" data-confirm-title="为此条提现记录设置【待定标签】标签确认"
                                   data-confirm-content='您确定要为记录ID为<span class="text-red">{$item.id}</span> 的提现记录设置【待定标签】吗？？'
                                   data-url="{:url('setpending?index=1')}">
                                    <i class="fa fa-circle"></i>
                                </a>
                                {/if}
                                {if $item.is_pending==1}
                                <a class="btn btn-warning btn-xs AjaxButton" data-toggle="tooltip" title="为此条提现记录取消【待定标签】"
                                   data-id="{$item.id}" data-confirm-title="取消此用户【同城页女孩】身份确认"
                                   data-confirm-content='您确定取消记录ID为<span class="text-red">{$item.id}</span> 的提现记录设置【待定标签】吗？？'
                                   data-url="{:url('setpending?index=0')}">
                                    <i class="fa fa-circle"></i>
                                </a>
                                {/if}
                            </td>
                            {else/}
                            <td style="text-align: center;vertical-align: middle;">-</td>
                            {/if}

                            <td style="text-align: center;vertical-align: middle;">
                                {if $item.status==0}
                                    {if $item.is_pending==0}
                                        {if $item.me_status==1}
                                            <a data-id="{$item.id}" data-url="passwithdraw" data-confirm="2" data-type="2"
                                               class="btn btn-success btn-xs AjaxButton"  title="通过用户的提现申请" data-toggle="tooltip">
                                                通过提现
                                            </a>
                                        {/if}

                                        <a data-id="{$item.id}" data-url="refusewithdraw" data-confirm="2" data-type="2"
                                           class="btn btn-danger btn-xs AjaxButton"  title="拒绝用户的提现申请" data-toggle="tooltip">
                                            拒绝提现
                                        </a>
                                    {else/}
                                        已设置待定
                                    {/if}
                                {else/}
                                    -
                                {/if}
                            </td>
                        </tr>
                        {/foreach}
                        </tbody>
                    </table>
                </div>

                <!-- 数据列表底部 -->
                <div class="box-footer">
                    {$page|raw}
                    <label class="control-label pull-right" style="margin-right: 10px; font-weight: 100;">
                        <small>共{$total}条记录</small>&nbsp;
                        <small>每页显示</small>
                        &nbsp;
                        <select class="input-sm" onchange="changePerPage(this)">
                            <option value="10" {if $admin.per_page==10}selected{/if}>10</option>
                            <option value="20" {if $admin.per_page==20}selected{/if}>20</option>
                            <option value="30" {if $admin.per_page==30}selected{/if}>30</option>
                            <option value="50" {if $admin.per_page==50}selected{/if}>50</option>
                            <option value="100" {if $admin.per_page==100}selected{/if}>100</option>
                        </select>
                        &nbsp;
                        <small>条记录</small>
                    </label>
                </div>

            </div>
        </div>
    </div>
</section>
<script>
    $(function () {
        $('.photo-list img').on('click', function () {
            layer.photos({
                photos: '.photo-list',
                shadeClose: false,
                closeBtn: 2,
                anim: 5
            });
        })
    });
</script>
{/block}

